-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn when ??? is used to implement erased definition #11740
Conversation
69b8d23
to
4d8749d
Compare
@@ -69,6 +73,12 @@ class PruneErasedDefs extends MiniPhase with SymTransformer { thisTransform => | |||
else tree | |||
|
|||
private def trivialErasedTree(tree: Tree)(using Context): Tree = | |||
tree match | |||
case tree: ValOrDefDef if !tree.symbol.is(Inline) && !tree.symbol.is(Synthetic) => | |||
if tree.rhs.symbol == defn.Predef_undefined then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next step might be to do tree.rhs.symbol != defn.Compiletime_erasedValue
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #11721 , it uses ???
for erased definitions. Is there a potential conflict?
It is possible. Currently, it seems not non of the tests have fatal warning. It should be fine. |
In #11721 , it uses |
That is not on the RHS of an erased definition. It will be fine. |
Could you elaborate? In |
No description provided.